﻿using Acme.SmartWMS.BasicInfo.SupplierService.DTO;
using Acme.SmartWMS.DataBasic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Text;
using System.Threading.Tasks;

namespace Acme.SmartWMS.BasicInfo.SupplierService
{
    public interface ISupplierAppService
    {
        /// <summary>
        /// 获取供应商管理显示 分页 查询
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="name"></param>
        /// <param name="supplierCode"></param>
        /// <returns></returns>
        Task<PagedResult> GetSupplierList(int pageIndex, int pageSize, string? name, string? supplierCode);
        /// <summary>
        /// 获取字典表数据，绑定企业属性下拉框
        /// </summary>
        /// <returns></returns>
        Task<List<DictItem>> GetDictItems(int dictTypeId);
        /// <summary>
        /// 添加供应商管理
        /// </summary>
        /// <param name="supplierDTO"></param>
        /// <returns></returns>
        Task<int> InsertSupplier(SupplierDTO supplierDTO);
        /// <summary>
        /// 删除供应商管理
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<int> DeleteSupplier(string ids);
        /// <summary>
        /// 获取供应商主键id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<SupplierDTO> GetSupplierById(int id);
        /// <summary>
        /// 更新供应商
        /// </summary>
        /// <param name="supplierDTO"></param>
        /// <returns></returns>
        Task<int> UpdateSupplier(SupplierDTO supplierDTO);
    }
}
